<template>
    <div>
        <button @click="sendMsgToParent">点击我给父子间传值</button>
        <h1>我是子组件</h1>
    </div>
</template>

<script>
  export default {
    name: "Child",
    methods:{
      sendMsgToParent(){
        this.$emit('ToParent','this message is from child')
      }
    }
  }
</script>

<style scoped>

</style>
